package com.example.guli.service.edu.controller.admin;

import com.example.guli.common.base.result.R;
import io.swagger.annotations.Api;
import org.springframework.web.bind.annotation.*;

@CrossOrigin
@RestController
@Api("临时登录mock")
@RequestMapping("/user")
public class LoginController {
    @PostMapping("login")
    public R login(){
        return R.ok().data("token","admin");
    }


    @GetMapping("info")
    public R info(){
        return R.ok()
                .data("name","admin")
                .data("roles","[admin]")
                .data("avatar","https://oss.aliyuncs.com/aliyun_id_photo_bucket/default_handsome.jpg");
    }

    @PostMapping("logout")
    public R logout(){
        return  R.ok();
    }

}
